package com.asset.dispoal.business.make.service;

import com.asset.dispoal.business.make.api.MakeService;
import com.asset.dispoal.business.make.dto.MakePageRequest;
import com.asset.dispoal.business.make.dto.MakePageResponse;
import com.asset.dispoal.business.make.dto.MakeReceiveCaseRequest;
import com.asset.dispoal.business.make.dto.MakeViewPageRequest;
import com.asset.dispoal.business.make.service.commom.MakeQueryPageCommand;
import com.asset.dispoal.business.make.service.commom.MakeQueryViewPageCommand;
import com.asset.dispoal.business.make.service.commom.MakeReceiveCaseCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

/**
 * @author qr
 * @date 2022/5/18$
 */
@Service
public class MakeServiceImpl implements MakeService {

    @Autowired
    MakeQueryPageCommand makeQueryPageCommand;

    @Autowired
    MakeQueryViewPageCommand makeQueryViewPageCommand;
    @Autowired
    MakeReceiveCaseCommand makeReceiveCaseCommand;

    @Override
    public Result<PageVO<MakePageResponse>> queryPage(MakePageRequest request) {
        return makeQueryPageCommand.execute(request);
    }

    @Override
    public Result receiveCase(MakeReceiveCaseRequest request) {
        return makeReceiveCaseCommand.execute(request);
    }

    @Override
    public Result<PageVO<MakePageResponse>> queryViewPage(MakeViewPageRequest request) {
        return makeQueryViewPageCommand.execute(request);
    }
}
